﻿using System.Windows.Forms;
using PictureOrganizer2.DataContainer;
using System;
using System.Drawing;

namespace PictureOrganizer2.Forms
{
    public partial class ConfigForm : Form
    {
        private log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        public ConfigForm()
        {
            InitializeComponent();

            this.Icon = Icon.FromHandle(Images.cog_edit.GetHicon());
            this.appSettingsContainerBindingSource.Add(new AppSettingsContainer());
        }

        private void ConfigForm_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
                this.Close();
        }

        private void btn_Ok_Click(object sender, EventArgs e)
        {
            ((AppSettingsContainer)this.appSettingsContainerBindingSource[0]).SaveConfig();
        }
    }
}
